#! /bin/sh

#set -x

# Alpine tar.gz image has wrong permissions on the "/" aka. root folder, 
# this prevents su from working, so only "install --root" is working.
/bin/chmod 755 /

cp /etc/apk/repositories /etc/apk/repositories.bak
sed -i 's@https*://dl-cdn.alpinelinux.org@http://localhost@g' /etc/apk/repositories
#echo "http://localhost/repository/alpine/alpine/edge/testing" >> /etc/apk/repositories

rm -f /etc/resolv.conf
touch ~/.profile
echo "# wsl settins
PS1='\\[\\033[01;32m\\]\${WSL_DISTRO_NAME}\\[\\033[00m\\]:\\[\\033[01;34m\\]\\W\\[\\033[00m\\]\\$ '
alias ll='ls -la'
alias npp='/mnt/d/tools/notepadpp/notepad++.exe'
" >> ~/.profile

mkdir ~/.pip
cp .seed/pip.conf ~/.pip/pip.conf

mkdir ~/.configs
cp .seed/podman.conf ~/.configs/podman.conf
cp .seed/docker.daemon.json ~/.configs/docker.daemon.json
